package com.cy.jxc.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@Accessors
public class JsonResult implements Serializable {
    private Integer status=1;
    private String message="ok";
    private Object data;
    private List<String> error;

    public JsonResult(){}
    public JsonResult(String message) {
        this.message=message;
    }
    public JsonResult(List<String> error){
        this.error=error;
    }
    public JsonResult(Throwable e){
        this.message=e.getMessage();
        this.status=0;
    }
    public JsonResult(Object data){
        this.data=data;
    }
}
